﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace ConvertTools
{
    public class MapField
    {
        public string ExcelColumn;
        public string SQLDatabaseField;
        public SqlDbType sqlDbType = SqlDbType.NVarChar;
        public LookUpObject oLookUpObject;
        public string DefaultValue;
        public string SQLDataFieldDisplay;
        public MapField()
        {
        }

        public MapField(
            string _ExcelColumn, 
            string _SQLDatabaseField, 
            SqlDbType _sqlDbType, 
            LookUpObject _oLookUpObject,
            string _SQLDataFieldDisplay)
        {
            ExcelColumn = _ExcelColumn;
            SQLDatabaseField = _SQLDatabaseField;//vi du frk_Material_Id
            sqlDbType = _sqlDbType;
            oLookUpObject = _oLookUpObject;
            SQLDataFieldDisplay = _SQLDataFieldDisplay; //MaterialName
        }



        public MapField(
            string _ExcelColumn,
            string _SQLDatabaseField,
            SqlDbType _sqlDbType,
            LookUpObject _oLookUpObject)
        {
            ExcelColumn = _ExcelColumn;
            SQLDatabaseField = _SQLDatabaseField;//vi du frk_Material_Id
            sqlDbType = _sqlDbType;
            oLookUpObject = _oLookUpObject;
        }


        public MapField(string _SQLDatabaseField, string _DefaultValue)
        {
            ExcelColumn = null;
            SQLDatabaseField = _SQLDatabaseField;
            sqlDbType = SqlDbType.VarChar;
            DefaultValue = _DefaultValue;
        }
    }
}
